Skip to content

Method: MinObjectParticipationConstraint(OWLClass, OWLObjectProperty, OWLClass, int)

1: /**
2: * Copyright (C) 2016 Czech Technical University in Prague
3: *
4: * This program is free software: you can redistribute it and/or modify it under
5: * the terms of the GNU General Public License as published by the Free Software
6: * Foundation, either version 3 of the License, or (at your option) any
7: * later version.
8: *
9: * This program is distributed in the hope that it will be useful, but WITHOUT
10: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12: * details. You should have received a copy of the GNU General Public License
13: * along with this program. If not, see <http://www.gnu.org/licenses/>.
14: */
15: package cz.cvut.kbss.jopa.model.ic;
16:
17: import org.semanticweb.owlapi.model.OWLClass;
18: import org.semanticweb.owlapi.model.OWLDataProperty;
19: import org.semanticweb.owlapi.model.OWLDatatype;
20: import org.semanticweb.owlapi.model.OWLObjectProperty;
21:
22: public class IntegrityConstraintFactory {
23:
24:         public static DataParticipationConstraint MinDataParticipationConstraint(
25:                         final OWLClass s, final OWLDataProperty p, final OWLDatatype o,
26:                         final int card) {
27:                 return new DataParticipationConstraintImpl(s, p, o, card, -1);
28:         }
29:
30:         public static DataParticipationConstraint MaxDataParticipationConstraint(
31:                         final OWLClass s, final OWLDataProperty p, final OWLDatatype o,
32:                         final int card) {
33:                 return new DataParticipationConstraintImpl(s, p, o, 0, card);
34:         }
35:
36:         public static DataParticipationConstraint DataParticipationConstraint(
37:                         final OWLClass s, final OWLDataProperty p, final OWLDatatype o,
38:                         final int min, int max) {
39:                 return new DataParticipationConstraintImpl(s, p, o, min, max);
40:         }
41:
42:         public static ObjectParticipationConstraint MinObjectParticipationConstraint(
43:                         final OWLClass s, final OWLObjectProperty p, final OWLClass o,
44:                         final int card) {
45:                 return new ObjectParticipationConstraintImpl(s, p, o, card, -1);
46:         }
47:
48:         public static ObjectParticipationConstraint MaxObjectParticipationConstraint(
49:                         final OWLClass s, final OWLObjectProperty p, final OWLClass o,
50:                         final int card) {
51:                 return new ObjectParticipationConstraintImpl(s, p, o, 0, card);
52:         }
53:
54:         public static ObjectParticipationConstraint ObjectParticipationConstraint(
55:                         final OWLClass s, final OWLObjectProperty p, final OWLClass o,
56:                         final int min, int max) {
57:                 return new ObjectParticipationConstraintImpl(s, p, o, min, max);
58:         }
59:
60:         public static ObjectDomainConstraint ObjectPropertyDomainConstraint(
61:                         final OWLObjectProperty p, final OWLClass s) {
62:                 return new ObjectDomainConstraintImpl(p, s);
63:         }
64:
65:         public static ObjectRangeConstraint ObjectPropertyRangeConstraint(
66:                         final OWLClass subj, final OWLObjectProperty p, final OWLClass s) {
67:                 return new ObjectRangeConstraintImpl(subj, p, s);
68:         }
69:
70:         public static DataDomainConstraint DataPropertyDomainConstraint(
71:                         final OWLDataProperty p, final OWLClass s) {
72:                 return new DataDomainConstraintImpl(p, s);
73:         }
74:
75:         public static DataRangeConstraint DataPropertyRangeConstraint(
76:                         final OWLClass subj, final OWLDataProperty p, final OWLDatatype s) {
77:                 return new DataRangeConstraintImpl(subj, p, s);
78:         }
79: }